Skip to content

Harden server timeout and shutdown tests - #1348

Merged
quinnj merged 2 commits into
masterfrom
codex/harden-idle-timeout-test
Aug 8, 2026
Merged

Harden server timeout and shutdown tests#1348
quinnj merged 2 commits into
masterfrom
codex/harden-idle-timeout-test

Conversation

@quinnj

@quinnj quinnj commented Aug 7, 2026

Copy link
Copy Markdown
Member

Summary

  • accept either clean EOF or a complete 408 response when an idle keep-alive connection expires
  • parse and validate any optional timeout response
  • run the active-session WebSocket shutdown test over both TCP and TLS
  • keep each test connection tracked until forceclose inspects it

Root causes

The HTTP server writes timeout responses on a best-effort basis. The test required an empty read, but the Windows Julia prerelease job can receive the complete 408 response before transport shutdown wins the race. Both wire outcomes close the idle connection correctly.

The WebSocket server tests covered TLS connection shutdown only when cleanup lost a race. This caused project coverage to vary by two untouched lines. The active-session test now exercises both transports while its handler is deliberately blocked.

Validation

  • complete test/http_server_http1_tests.jl passed in an isolated environment
  • complete test/http_websocket_server_tests.jl passed in an isolated environment
  • local LCOV trace records hits for both TCP and TLS forceclose branches
  • first exact-head CI run passed all six GitHub Actions jobs, including Windows Julia prerelease
  • git diff --check passed

Co-authored by Codex

The server may write a complete 408 response before transport shutdown wins the race. Validate that optional response instead of requiring an empty read.
@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.53%. Comparing base (d18d3b4) to head (cd75f96).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1348   +/-   ##
=======================================
  Coverage   88.53%   88.53%           
=======================================
  Files          31       31           
  Lines       11961    11961           
=======================================
  Hits        10590    10590           
  Misses       1371     1371           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Run the active-session shutdown test over both TCP and TLS. The blocked handler keeps each connection tracked until forceclose inspects it, which removes timing-dependent project coverage.
@quinnj quinnj changed the title Harden idle timeout test for optional 408 response Harden server timeout and shutdown tests Aug 7, 2026
@quinnj
quinnj marked this pull request as ready for review August 8, 2026 16:55
@quinnj
quinnj merged commit f2b1265 into master Aug 8, 2026
8 checks passed
@quinnj
quinnj deleted the codex/harden-idle-timeout-test branch August 8, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant